package com.fun.fun.frame.utils

import com.fun.frame.SourceCode
import com.fun.interfaces.IBean
import org.apache.commons.beanutils.BeanUtils

class BeanUtil extends SourceCode {
/**
 * 从json对象中拷贝属性到bean
 * @param bean
 * @param source
 * @return
 */
    static copy(IBean bean, Object source) {
        try {
            BeanUtils.copyProperties(bean, source)
        } catch (Exception e) {
            output("拷贝属性失败！")
        }
    }
}
